import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:xin_nuo_pda/values/colors.dart';
import 'package:xin_nuo_pda/values/constant.dart';

import '../utils/string_extension.dart';
import 'SettingController.dart';
import 'package:package_info/package_info.dart';

class SettingsPage extends StatelessWidget {
  final SettingController logic = Get.put(SettingController());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("设置"),
      ),
      body: Container(
        color: bg_gray.toColor(),
        child:Column(
          children: [
            SizedBox(height: 12,),
            Material(
              color: Colors.white,
              child: Ink(
                child: InkWell(
                    onTap: () {},
                    child: Container(
                      child: ListTile(
                        title: Text("IP地址"),
                        subtitle: Text(BASE_URL),
                        trailing: Icon(Icons.arrow_forward_ios),
                      ),
                    )),
              ) ,
            ),
            SizedBox(height: 1,),
            Material(
              color: Colors.white,
              child: Ink(
                child: InkWell(
                    onTap: () {},
                    child: Container(
                      child: ListTile(
                        title: Text("文件地址"),
                        subtitle: Text(FILE_URL),
                        trailing: Icon(Icons.arrow_forward_ios),
                      ),
                    )),
              ) ,
            ),
            SizedBox(height: 8,),
            Material(
              color: Colors.white,
              child: Ink(
                child: InkWell(
                    onTap: () {},
                    child: Container(
                      child: ListTile(
                        title: Text("当前版本：" + Get.find<PackageInfo>().version),
                        trailing: Icon(Icons.arrow_forward_ios),
                      ),
                    )),
              ) ,
            ),
          ],
        ),
      ),
    );
  }
}
